﻿#include "TcpCodec_DataBase.h"

#include "TcpCodec.h"

TcpCodec_DataBase::TcpCodec_DataBase()
{
  setObjectName(getClassNameFirstLow<TcpCodec_DataBase>());
}

TcpCodec_DataBase::~TcpCodec_DataBase()
{

}

void TcpCodec_DataBase::decode(DataPackage_TcpCodec* dataPackageInfo_User)
{
  (void)dataPackageInfo_User;
}

TcpCodec* TcpCodec_DataBase::getTcpCodec()const
{
  return tcpCodec;
}

TcpCodec_DataBase* TcpCodec_DataBase::setTcpCodec(TcpCodec* const tcpCodec)
{
  this->tcpCodec=tcpCodec;
  tcpCodec->addToCodecMap(TcpCodec_DataBase::DataBase,this);
  printInjection(this,tcpCodec);
  return this;
}

void TcpCodec_DataBase::objectAutoInjection(QHash<QString,QObject*>* objMap)
{
  setTcpCodec(getObjFromMap<TcpCodec>(objMap));
}
